#!/usr/bin/python

def main(args=[]):
    print "Phirestar loader v0.1"
    
    if len(args)== 1:
        print "Command line options:"
        print args[0], "server"
        print args[0], "client"
        print args[0], "testing"
        return

    if args[1] == "server":
        from pserver import smain
        smain.main(args[2:])
    elif args[1] == "client":
        from pclient import cmain
        cmain.main(args[2:])
    elif args[1] == "testing":
        from tests import testserver, testclient
        print "Testing server..."
        testserver.main()
        print "Testing client..."
        #testclient.main()
    else:
        print args[1], "not a recognizable Phirestar component."

if __name__ == "__main__":
    import sys
    main(sys.argv)
